//
//  SignatureUtil.h
//  signature
//
//  Created by tom on 2019/7/17.
//  Copyright © 2019 NWD. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface SignatureUtil : NSObject

+ (NSString *)md5:(NSString *)input;

/**
 Using the RSA private key to sign the specified message

 @param content message
 @param priKey private key
 @return sign
 */
+ (NSString *)sign:(NSString *)content withPriKey:(NSString *)priKey;

/**
 verify Signature

 @param content sign original string
 @param signature signature to verify
 @param publicKey public key string
 @return the result of verify
 */
+ (BOOL)verify:(NSString *)content signature:(NSString *)signature withPublivKey:(NSString *)publicKey;

@end

NS_ASSUME_NONNULL_END
